var myv = "local value"
(function () {
  var myvar = "local value";
    console.log(myvar); // undefined

    // var myvar = "local value";
  })();
  // console.log("2",myvar);